<?php
/* 
 * ebiz front
 * 
 * product comment View
 * 
 * @author steve
 * 
 */
?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
    <head>
        <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
        <title>商品评论-阿基米米网上商城</title>
        <script type='text/javascript' language='javascript' src='//<?php echo ConfigConstants::$iConstants.".".DOMAIN; ?>/n/javascript/lib/jquery.js'></script>
        <script type='text/javascript' language='javascript' src='//<?php echo ConfigConstants::$iConstants.".".DOMAIN; ?>/n/javascript/lib/jquery-ui-datepicker.js'></script>
        <script type='text/javascript' language='javascript' src='//<?php echo ConfigConstants::$iConstants.".".DOMAIN; ?>/n/javascript/frontend.js'></script>
        <script type='text/javascript' language='javascript' src='//<?php echo ConfigConstants::$iConstants.".".DOMAIN; ?>/t/<?php echo $GLOBALS["config"]['template_name']; ?>/javascript/akimimi.js'></script>
        <link href='//<?php echo ConfigConstants::$iConstants.".".DOMAIN; ?>/t/<?php echo $GLOBALS["config"]['template_name']; ?>/css/style.css' rel='stylesheet' type='text/css' />   
        <link href='//<?php echo ConfigConstants::$iConstants.".".DOMAIN; ?>/t/<?php echo $GLOBALS["config"]['template_name']; ?>/css/default.css' rel='stylesheet' type='text/css' />
        <link href='//<?php echo ConfigConstants::$iConstants.".".DOMAIN; ?>/t/<?php echo $GLOBALS["config"]['template_name']; ?>/css/myaccountleftnav.css' rel='stylesheet' type='text/css' />
        <link href='//<?php echo ConfigConstants::$iConstants.".".DOMAIN; ?>/t/<?php echo $GLOBALS["config"]['template_name']; ?>/css/myaccount.css' rel='stylesheet' type='text/css' />                  
        <link href='//<?php echo ConfigConstants::$iConstants.".".DOMAIN; ?>/t/<?php echo $GLOBALS["config"]['template_name']; ?>/css/headerAndFooter.css' rel='stylesheet' type='text/css' />
    </head>
    <body>
        <?php 
            require_once '../app/views/HeaderView.php';
            echo HeaderView::getCommonHeaderView();
        ?>
        <div id="navigation">
            <a href="/">首页</a>
            <span>></span>
            <a href="/userinfo/index">我的阿基米米</a>
            <span>></span>
            <a href="/userinfo/mycomment">商品评论</a>
        </div>
        <div id="mymimi_body">
        <?php 
            require_once '../app/views/MyAccoutLeftNavView.php';
            echo MyAccountLeftNav::getMyAccountLeftNav();
        ?>
            <div id="mymimi_right">
                  <div class="right_bj"></div>
                  <div class="zi_box">
                      <h5>商品评论</h5>
                      <table class="zi_table" cellpadding='0' cellspacing='0' border='0'>
                          <tbody>
                              <tr>
                                 <th>编号</th>
                                 <th>产品名称</th>
                                 <th>分数</th>
                                 <th>评论时间</th>
                                 <th>操作</th>
                              </tr>
                              <?php 
                              $commentId = 0;
                              foreach($arr_output['rows'] as $arr_data){
                                  if($commentId == $arr_data['comment_id']){
                            	      continue;
                                  }else{
                            	      $commentId = $arr_data['comment_id'];
                                  }
                              ?>
                              <tr>
                                  <td class="zi_table_td1"><?php echo $arr_data['comment_id']; ?></td>
                                  <td class="zi_table_td1"><?php echo $arr_data['product_title']; ?></td>
                                  <td class="zi_table_td1"><?php echo $arr_data['comment_point']; ?></td>
                                  <td class="zi_table_td1"><?php echo $arr_data['comment_created']; ?></td>
                                  <td class="zi_table_td1"><a href="#comment_detail_<?php echo $arr_data['comment_id']; ?>" ><?php echo MQPREVIEWTXT; ?></a></td>
                              </tr>
                              <?php }?>
                              <?php $pager = new Pager();?>
                              <tr><td id="zi_tabletr1" colspan="5"><div class="p2_page"><?php echo $pager->paginate($arr_output['pager']['nowpage'], $arr_output['pager']['countrows'], '/userinfo/mycomment/', $arr_output['pager']['prepage'] ); ?></div></td></tr>
                          </tbody>
                      </table>
                  </div>
                  <div class="zi_box1">
                        <h5>评论详细</h5>
                         <?php 
                         $commentId = 0;
                         foreach($arr_output['rows'] as $arr_data){
                            if($commentId == $arr_data['comment_id']){
                            	continue;
                            }else{
                            	$commentId = $arr_data['comment_id'];
                            }
                         	?>
                             <ul>
                                 <li class="zi_box1_li06"  ><a name="comment_detail_<?php echo $arr_data['comment_id']; ?>"><?php echo $arr_data['comment_content']; ?></a></li>
                                 <?php if (!empty($arr_data['reply_created'])) { ?>
            	                 <li class="zi_box1_li02"><?php echo $arr_data['reply_content']; ?></li>
            	                 <li class="zi_box1_li03"><?php echo '米米客服 回复于 '.$arr_data['reply_created'];?></li>
        	                     <?php } ?>
                            </ul>
                         <?php } ?>
                  </div>
              </div>
   
          <?php 
            require_once '../app/views/FooterView.php';
            echo FooterView::getCommonFooterView();
         ?>
          
    </body>
</html>